#ifndef POINTCLOUDVISUALIZATION_H
#define POINTCLOUDVISUALIZATION_H

#include <QWidget>
#include <QVector3D>
#include <QList>
#include <QtDataVisualization>
#include <QAbstract3DInputHandler>
#include <QQueue>

using namespace QtDataVisualization;

namespace Ui {
class PointCloudVisualization;
}

class PointCloudVisualization : public QWidget {
    Q_OBJECT

  public:
    explicit PointCloudVisualization(QWidget *parent = nullptr);
    ~PointCloudVisualization();

    Q3DScatter *scatter;
    QScatter3DSeries *series = new QScatter3DSeries;

    void init(void);

  private:
    Ui::PointCloudVisualization *ui;

  public slots:
    void drawPoints(void);
};

typedef struct {
    QVector3D point;
    uint16_t num;
    float height;
    uint8_t quality;
} PointCloud_t ;

extern QQueue<PointCloud_t> d_queue;

#endif // POINTCLOUDVISUALIZATION_H
